package com.liusaidh.service.impl;

import com.liusaidh.domain.AuditBlog;
import com.liusaidh.domain.Type;
import com.liusaidh.result.Result;
import com.liusaidh.result.Status;
import com.liusaidh.mapper.AddMapper;
import com.liusaidh.service.AddService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author liusaidh
 * @date 2024/7/6 8:37
 * @description
 */
@Service
public class AddServiceImpl implements AddService {

    @Resource
    private AddMapper addMapper;

    @Override
    public Result getBlogByType(Integer id) {
        List<AuditBlog> list = addMapper.getBlogByType(id);
        return Result.success(Status.OK,"获取成功",list);
    }

    @Override
    public Result getAllType() {
        List<Type> list = addMapper.getAllType();
        return Result.success(Status.OK,"获取成功",list);
    }
}
